package com.interview.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MVCConfig implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addRedirectViewController("/","login.html");
        registry.addViewController("login.html").setViewName("login");

        registry.addRedirectViewController("/config-waitingRoom","config-waitingRoom.html");
        registry.addViewController("config-waitingRoom.html").setViewName("config-waitingRoom");

        registry.addRedirectViewController("/examee-list","examee-list.html");
        registry.addViewController("examee-list.html").setViewName("examee-list");

        registry.addRedirectViewController("/examee-sign","examee-sign.html");
        registry.addViewController("examee-sign.html").setViewName("examee-sign");

        registry.addRedirectViewController("/examee-drawlots","examee-drawlots.html");
        registry.addViewController("examee-drawlots.html").setViewName("examee-drawlots");

        registry.addRedirectViewController("/examee-uploadData","examee-uploadData.html");
        registry.addViewController("examee-uploadData.html").setViewName("examee-uploadData");

    }
}
